﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Calc1Contract;
using CalcAddInView;
using System.AddIn;
using System.AddIn.Pipeline;
using System.AddIn.Contract;

namespace CalcAddInSideAdapter
{
    [AddInAdapter]
    public  class CalculatorViewToContractAdapter:ContractBase ,ICalcContract 
    {
        private ICalculator _view;

        public CalculatorViewToContractAdapter(ICalculator view)
        {
            _view = view;
        }

        #region ICalcContract Members

        public double Add(double x, double y)
        {
            return _view.Add(x, y);   
        }

        public double Substract(double x, double y)
        {
            return _view.Substract(x, y);   
        }

        public double Mitiply(double x, double y)
        {
            return _view.Mitiply(x, y);
        }

        public double Divide(double x, double y)
        {
            return _view.Divide(x, y);
        }

        #endregion
    }
}
